/**
 * 
 */
package com.ordoict.smallsettlement.business.authentication.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.ordoict.smallsettlement.business.authentication.entity.AuthenticationEntity;
import com.ordoict.smallsettlement.business.generic.dao.GenericDAO;

/**
 * DESC : 
 *
 * @company : OrdoICT.,Inc
 * @author  : Choi Jin Wook // choijinwook84@ordoict.com
 * @version : 1.0.0
 * @since   : 2013. 12. 3.
 * 
 */
@Repository
public class AuthenticationDAO extends SqlSessionDaoSupport implements GenericDAO<AuthenticationEntity> {
    
    public AuthenticationDAO(){}
    
    @Autowired
    public AuthenticationDAO(SqlSessionFactory sqlSessionFactory){
        super();
        setSqlSessionFactory(sqlSessionFactory);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public AuthenticationEntity get(AuthenticationEntity entity) throws DataAccessException {
        return (AuthenticationEntity)getSqlSession().selectOne("business.Authentication.list",entity) ;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<AuthenticationEntity> getList(AuthenticationEntity entity) throws DataAccessException {
        return getSqlSession().selectList("business.Authentication.list", entity);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Integer count(AuthenticationEntity entity) throws DataAccessException {
        return (Integer)getSqlSession().selectOne("business.Authentication.count", entity);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public AuthenticationEntity add(AuthenticationEntity entity)
            throws DataAccessException {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public AuthenticationEntity update(AuthenticationEntity entity)
            throws DataAccessException {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int delete(AuthenticationEntity entity) throws DataAccessException {
        return 0;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public AuthenticationEntity psm(AuthenticationEntity entity)
            throws DataAccessException {
        return null;
    }

}
